<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Value_json')}:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-name="row[value_json]">
                <dd>
                    <ins>{:__('名称')}</ins>
                    <ins>{:__('提示')}</ins>
                </dd>
                <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                <textarea name="row[value_json]" class="form-control hide" cols="30" rows="5">{"":""}</textarea>
            </dl>
        </div>
        <!--<div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-name="row[value_json]" data-template="attach_tpl">
                <dd>
                    <ins>等级</ins>
                    <ins>价格</ins>
                    <ins>价格</ins>
                </dd>
                <dd>
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append hide"><i class="fa fa-plus"></i> 追加</a>
                </dd>
                <textarea name="row[value_json]" class="form-control hide" cols="30" rows="5">[{}]</textarea>
            </dl>
        </div>-->
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<!--定义模板-->
<script type="text/html" id="attach_tpl">
    <dd class="form-inline">
        <input type="hidden" name="row[<%=name%>][<%=index%>][grade_id]" class="form-control" value="<%=row['grade_id']%>" size="10">
        <input type="text" name="row[<%=name%>][<%=index%>][name]" disabled readonly class="form-control" value="<%=row['name']%>" size="10">
        <input type="number" name="row[<%=name%>][<%=index%>][price]" class="form-control" value="<%=row['price']%>" style="min-width: 300px;" placeholder="默认继承代理等级处的折扣设置">
    </dd>
</script>
